import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Button-IconButton-图标按钮',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Button-IconButton-图标按钮'),
        ),
          body: Column(
            children: [
              Container(
                width: 200,
                height: 200,
                decoration: BoxDecoration(
                  color: Colors.white70
                ),
                child: IconButton(
                    onPressed: (){print('IconButton');},
                    iconSize: 28,
                    color: Colors.green,
                    padding: EdgeInsets.all(5),
                    splashColor: Colors.red,
                    //提示文本
                    tooltip: 'EdgeInsets',
                    alignment: AlignmentDirectional.center,
                    icon: Icon(Icons.add)) ,
              ),

            ],
          )
      ),
    );
  }
}
